#!ipxe

goto ${menu} ||

:live_menu
set os Feren OS Live
menu ${os}
item --gap ${os} Versions
item current ${space} ${os} Current
choose live_version || goto live_exit
menu ${os} ${live_version}
item --gap ${os} Flavors
goto ${live_version}

:current
{% for key, value in endpoints.items() %}
{% if value.os == "feren" %}
item {{ value.path }} ${space} {{ value.os | title }} {{ value.version | title }}
{% endif %}
{% endfor %}
choose path || goto live_menu
goto feren-boot

:feren-boot
imgfree
set squash_url ${live_endpoint}${path}filesystem.squashfs
set kernel_url ${live_endpoint}${path}
kernel ${kernel_url}vmlinuz ip=dhcp boot=casper netboot=http fetch=${squash_url} {{ kernel_params }}
initrd ${kernel_url}initrd
boot

:live_exit
clear menu
exit 0

